package com.google.code.menino_de_barro.dao.oracle;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class ConnectionFactoryOracle {
	static String driver = "oracle.jdbc.OracleDriver";
	static Connection con = null;

	// public static Connection getConnection() {
	// try {
	// Class.forName(driver);
	// con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe",
	// "MeninoDeBarro", "Menino123");
	//
	// } catch (Exception e) {
	// e.getMessage();
	// }
	// return con;
	// }

	public Connection getConnection() throws SQLException,
			ClassNotFoundException {
		Class.forName("oracle.jdbc.OracleDriver");
		return DriverManager.getConnection(
				"jdbc:oracle:thin:@localhost:1521:xe", "MeninoDeBarro",
				"Menino123");
	}

}
